<template>
  <view class="player-container">
    <video 
      id="iptv-player"
      :src="currentChannel.url"
      controls
      autoplay
      class="video-player"
      @error="onPlayerError"
      ref="videoPlayer"
    ></video>
    <!-- 其他内容 -->
  </view>
</template>

<script>
export default {
  props: {
    currentChannel: {
      type: Object,
      required: true
    }
  },
  methods: {
    onPlayerError(e) {
      console.error('播放错误:', e)
      uni.showToast({
        title: '播放失败，尝试切换源',
        icon: 'none'
      })
    }
  }
}
</script>